package com.hua.method;



public class Demo02 {
    public static void main(String[] args) {
        int a = max(21,21);
        System.out.println(a);

    }

    public static int max(int num1, int num2) {
        int result = 0;
        if (num1 ==num2){
            System.out.println("两数相等");
            return 0;//会终止方法，下面的代码不会运行了
        }

        if (num1 > num2) {
            result = num1;
        }else {
            result = num2;
        }
        return result;
    }
}